package com.dyzx.hbb.modules.finance.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * 快递信息表
 * @TableName finance_ems_template
 */
@TableName(value ="finance_ems_template")
@Data
public class FinanceEmsTemplate {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 名称
     */
    private String name;

    /**
     * 备注
     */
    private String description;

    /**
     * 状态：默认(1),1-提交，2-发货，3-已收货，4-检验，5-退货申请，6-退货处理，7-结束完成
     */
    private Integer status;

    /**
     * 快递单号
     */
    private String emsNo;

    /**
     * 单位
     */
    private String unit;

    /**
     * 联系人姓名
     */
    private String contactName;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 联系邮箱
     */
    private String email;

    /**
     * 发货时间
     */
    private Long deliveryTime;

    /**
     * 收货时间
     */
    private Long receivedTime;

    /**
     * 检验时间
     */
    private Long inspectionTime;

    /**
     * 退货申请时间
     */
    private Long returnApplyTime;

    /**
     * 退货处理时间
     */
    private Long returnProcessTime;

    /**
     * 完成时间
     */
    private Long finishTime;

    /**
     * 退款金额
     */
    private Long refundAmount;

    /**
     * 订单金额
     */
    private Long amount;

    /**
     * 商品数量
     */
    private Integer quantity;

    /**
     * 退货数量
     */
    private Integer returnQuantity;

    /**
     * 发货人员
     */
    private Long deliveryStaffId;

    /**
     * 收货人员
     */
    private Long receivedStaffId;

    /**
     * 退货申请人
     */
    private Long returnApplyStaffId;

    /**
     * 完成人员
     */
    private Long finishStaffId;

    /**
     * 创建日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createDate;

    /**
     * 更新日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 删除标记: 0-未删除, 1-已删除
     */
    private Integer deleted;

    /**
     * 操作人ID
     */
    private Long operatorId;

    /**
     * 企业ID
     */
    private Long organId;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FinanceEmsTemplate other = (FinanceEmsTemplate) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getEmsNo() == null ? other.getEmsNo() == null : this.getEmsNo().equals(other.getEmsNo()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getDeliveryTime() == null ? other.getDeliveryTime() == null : this.getDeliveryTime().equals(other.getDeliveryTime()))
            && (this.getReceivedTime() == null ? other.getReceivedTime() == null : this.getReceivedTime().equals(other.getReceivedTime()))
            && (this.getInspectionTime() == null ? other.getInspectionTime() == null : this.getInspectionTime().equals(other.getInspectionTime()))
            && (this.getReturnApplyTime() == null ? other.getReturnApplyTime() == null : this.getReturnApplyTime().equals(other.getReturnApplyTime()))
            && (this.getReturnProcessTime() == null ? other.getReturnProcessTime() == null : this.getReturnProcessTime().equals(other.getReturnProcessTime()))
            && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
            && (this.getRefundAmount() == null ? other.getRefundAmount() == null : this.getRefundAmount().equals(other.getRefundAmount()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getReturnQuantity() == null ? other.getReturnQuantity() == null : this.getReturnQuantity().equals(other.getReturnQuantity()))
            && (this.getDeliveryStaffId() == null ? other.getDeliveryStaffId() == null : this.getDeliveryStaffId().equals(other.getDeliveryStaffId()))
            && (this.getReceivedStaffId() == null ? other.getReceivedStaffId() == null : this.getReceivedStaffId().equals(other.getReceivedStaffId()))
            && (this.getReturnApplyStaffId() == null ? other.getReturnApplyStaffId() == null : this.getReturnApplyStaffId().equals(other.getReturnApplyStaffId()))
            && (this.getFinishStaffId() == null ? other.getFinishStaffId() == null : this.getFinishStaffId().equals(other.getFinishStaffId()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getOrganId() == null ? other.getOrganId() == null : this.getOrganId().equals(other.getOrganId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getEmsNo() == null) ? 0 : getEmsNo().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getDeliveryTime() == null) ? 0 : getDeliveryTime().hashCode());
        result = prime * result + ((getReceivedTime() == null) ? 0 : getReceivedTime().hashCode());
        result = prime * result + ((getInspectionTime() == null) ? 0 : getInspectionTime().hashCode());
        result = prime * result + ((getReturnApplyTime() == null) ? 0 : getReturnApplyTime().hashCode());
        result = prime * result + ((getReturnProcessTime() == null) ? 0 : getReturnProcessTime().hashCode());
        result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
        result = prime * result + ((getRefundAmount() == null) ? 0 : getRefundAmount().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getReturnQuantity() == null) ? 0 : getReturnQuantity().hashCode());
        result = prime * result + ((getDeliveryStaffId() == null) ? 0 : getDeliveryStaffId().hashCode());
        result = prime * result + ((getReceivedStaffId() == null) ? 0 : getReceivedStaffId().hashCode());
        result = prime * result + ((getReturnApplyStaffId() == null) ? 0 : getReturnApplyStaffId().hashCode());
        result = prime * result + ((getFinishStaffId() == null) ? 0 : getFinishStaffId().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getOrganId() == null) ? 0 : getOrganId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", description=").append(description);
        sb.append(", status=").append(status);
        sb.append(", emsNo=").append(emsNo);
        sb.append(", unit=").append(unit);
        sb.append(", contactName=").append(contactName);
        sb.append(", phone=").append(phone);
        sb.append(", email=").append(email);
        sb.append(", deliveryTime=").append(deliveryTime);
        sb.append(", receivedTime=").append(receivedTime);
        sb.append(", inspectionTime=").append(inspectionTime);
        sb.append(", returnApplyTime=").append(returnApplyTime);
        sb.append(", returnProcessTime=").append(returnProcessTime);
        sb.append(", finishTime=").append(finishTime);
        sb.append(", refundAmount=").append(refundAmount);
        sb.append(", amount=").append(amount);
        sb.append(", quantity=").append(quantity);
        sb.append(", returnQuantity=").append(returnQuantity);
        sb.append(", deliveryStaffId=").append(deliveryStaffId);
        sb.append(", receivedStaffId=").append(receivedStaffId);
        sb.append(", returnApplyStaffId=").append(returnApplyStaffId);
        sb.append(", finishStaffId=").append(finishStaffId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", deleted=").append(deleted);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", organId=").append(organId);
        sb.append("]");
        return sb.toString();
    }
}